package customer.zspt.cn.customer.utils;

import java.util.Comparator;

import customer.zspt.cn.customer.bean.PersonalIDao;

/**排序接口
 * Created by Administrator on 2018/6/8 0008.
 */

public class ContentComparator implements Comparator<PersonalIDao.userList> {
    @Override
    public int compare(PersonalIDao.userList first, PersonalIDao.userList end) {
        char fc = Chinese2SpellUtils.getPingYin(first.kefuRealname,3).charAt(0);
        char ec = Chinese2SpellUtils.getPingYin(end.kefuRealname,3).charAt(0);
        boolean fcb = (fc>95&&fc<123)?true:false;
        boolean ecb = (ec>95&&ec<123)?true:false;
        if(!fcb&&!ecb)
        {
            return 0;
        }
        else if(!fcb&&ecb)
        {
            return -1;
        }
        else if(fcb&&!ecb)
        {
            return 1;
        }
        return -(fc-ec);
    }
}
